#!/usr/bin/perl
# file: read_three.pl
use strict;
for (1..3){
    last unless defined (my $line = <>);
    warn "Read_three got : $line";
}